/**
 * 所有的文章相关的接口
 * @author 768449566@qq.com
 */
//https://wintc.top/article/20
import service from "@/utils/service";

import axios from 'axios'

export function getUser(params) {
  return service({
    url:"/user/3",
    params,
    method:"GET"
  })
}

export function getUserInfo(data) {
  return service({
    url:"/user/message",
    method:"POST",
    data,
  })
}



export function getArticleList(params) {
  return service({
    url:"/article/get",
    params
  })
}

//https://docs.github.com/en/rest/reference/repos#list-repositories-for-the-authenticated-user
/**
 * 拉取github的仓库列表
 * @param params
 * @returns {AxiosPromise}
 */
export function getGitalkIssue(params) {
  return axios({
    url:"https://api.github.com/repos/Arrowfield/solo-blog/issues",
    method:"GET",
    params,
  })
}

export function getIssueComments(params) {
  return axios({
    url:"https://api.github.com/repos/Arrowfield/solo-blog/issues/comments",
    method:"GET",
    params,
  })
}


export function getArticleById(data) {
  return service.post("/article/getById",data)
}

export function recordCount(data){
  return service.post("/article/recordViewCount",data)
}

export function getPhotoList(){
  return service.get("/article/draw/get")
}
export function getMoviesDetail(data){
  return service.post("/article/getByPath",data)
}

export function getCrossList(){
  return service.get("/admin/cross/get")
}

